<?php require('template/header.php') ?>
		<!-- main content start-->
		<div id="page-wrapper">
			<div class="main-page">
				<div class="tables">
					<div class="table-responsive bs-example widget-shadow">
							<table align="center" width="90%" border="1">
						 	<tr>
						 		<th width="80">菜品编号</th>
						 		<th width="80">菜品名</th>
						 		<th width="80">价格</th>
						 		<th width="150">图片</th>
						 		<th width="80">操作|<a href="index.php?c=food&m=foodform">添加</a></th>
						 	</tr>

						 	<?php 
						 		$sql="select * from food";
						 		$result = mysql_query($sql);
						 		while ($row=mysql_fetch_assoc($result)){
						 		echo'<tr>';
						 		echo'<td>'.$row['fid'].'</td>';
						 		echo'<td>'.$row['name'].'</td>';
						 		echo '<td>'.$row['price'].'</td>';
						 		echo '<td align="center"><img src='.'../images/'.$row['pic'].' width=100 height=90 alt="无图片"></td>';
						 		echo '<td><a href="index.php?c=food&m=editfood&fid='.$row['fid'].'">修改</a>|<a href="index.php?c=food&m=delfood&fid='.$row['fid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
								echo '</tr>';
						 	}
						 	?>
						 		</table>
					</div>
				</div>
			</div>
		</div>
<?php require('template/footer.php') ?>			